package com.dsr.controller;

import com.dsr.consts.Result;
import com.dsr.service.DesktopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dsr
 * @since 2020-10-19
 */
@RestController
@RequestMapping("/desktop")
public class DesktopController {
    @Autowired
    private DesktopService desktopService;

    @GetMapping("/sum")
    public Result saleSum(){
        return desktopService.saleSum();
    }
    @GetMapping("/day/sum")
    public Result daySum(){
        return desktopService.daysum();
    }
    @GetMapping("/mouth/sum")
    public Result mouthSum(){
        return desktopService.mouthSum();
    }
    @GetMapping("/commit/sum")
    public Result commitSum(){
        return desktopService.commitSum();
    }
    @GetMapping("/sale/top")
    public Result saleTop(){
        return desktopService.saleTop();
    }
    @GetMapping("/collect/top")
    public Result collectTop(){
        return desktopService.collectTop();
    }
    @GetMapping("/shop/top")
    public Result shopTop(){
        return desktopService.shopTop();
    }
}
